import { defHttp as request } from '/@/utils/http/axios';

export const getOrgList = (p) => {
  return request.post({
    url: '/org/queryOrg',
    data: p,
  });
};

export const addOrg = (p) => {
  return request.post({
    url: '/org/addOrg',
    data: p,
  });
};
export const updateOrg = (p) => {
  return request.post({
    url: '/org/updateOrg',
    data: p,
  });
};
export const deleteOrg = (p) => {
  return request.post({
    url: '/org/deleteOrg',
    data: p,
  });
};
export const queryAllOrgAndUser = () => {
  return request.post({
    url: '/core/org/queryAllOrgAndUser',
  });
};
export const modifyUserIdsByOrgId = (p) => {
  return request.post({
    url: '/user/grantOrg',
    data: p,
  });
};
export const queryAllSysOrg = () => {
  return request.post({
    url: '/core/sysOrg/queryAllSysOrg',
  });
};
export const batchAddOrgToTree = (p) => {
  return request.post({
    url: '/core/org/batchModifyOrgByClient',
    data: p,
  });
};
export const updateOrgResource = (p) => {
  return request.post({
    url: '/core/clientManagerRelation/grantOrgByClientManager',
    data: p,
  });
};
